             package com.java.diagnostics.visualizer.recommender.balanced;
             
             import com.java.diagnostics.visualizer.data.AggregateData;
             import com.java.diagnostics.visualizer.data.TupleData;
             import com.java.diagnostics.visualizer.recommender.Recommendation;
             import com.java.diagnostics.visualizer.recommender.RecommendationBase;
             import com.java.diagnostics.visualizer.recommender.util.RecommendationLabels;
             import java.text.MessageFormat;
             
             public class LookForWarningsInPartials
               extends RecommendationBase
               implements Recommendation
             {
               protected String label;
               protected int identifier;
               
               public void recommend(AggregateData data)
               {
                 TupleData warningPauses = data.getTupleData("VGCLabels.partial.warnings");
                 TupleData allPauses = data
                   .getTupleData("VGCLabels.pause.times.without.exclusive.access");
                 
                 if ((warningPauses != null) && (allPauses != null)) {
                   double meanWarning = warningPauses.getRawMeanY();
                   double numberWithout = allPauses.length() - warningPauses.length();
                   double totalWithout = allPauses.getRawTotalY() - 
                     warningPauses.getRawTotalY();
                   double meanWithout = totalWithout / numberWithout;
                   
                   if (meanWarning > meanWithout * 0.5D + meanWithout) {
                     addWarning(data, MessageFormat.format(
                       RecommendationLabels.LONG_PARTIALS_WARNING, 
                       new Object[] { Integer.valueOf(warningPauses.length()) }));
                   }
                 }
               }
             }


